const {
  mysql
} = require('../qcloud')

module.exports = async(ctx, next) => {
  let ret
  await mysql('xplorecater').insert({
      cater_id: ctx.query.cater_id,
      cater_name: ctx.query.cater_name,
      cater_gender: ctx.query.cater_gender,
      cater_cell: ctx.query.cater_cell,
      cater_from: ctx.query.cater_from,
      cater_location: ctx.query.cater_location,
      cater_label: ctx.query.cater_label,
      personal_label: ctx.query.personal_label,
      cater_introduction: ctx.query.introduction,
      cater_pic_url: ctx.query.cater_pic_url,
      title1: ctx.query.title1,
      project1: ctx.query.project1,
      title2: ctx.query.title2,
      project2: ctx.query.project2,
    })
    .then(function(res) {
      ret = res;
    }).catch(err => {
      ret = err
    })

  ctx.body = ret

}